Integrand size = 26, antiderivative size = 80 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2} \, dx=\frac {(A-i B) x}{4 a^2}+\frac {i A-B}{4 f (a+i a \tan (e+f x))^2}+\frac {i A+B}{4 f \left (a^2+i a^2 \tan (e+f x)\right )} \]
[Out]
Time = 0.08 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {3607, 3560, 8} \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2} \, dx=\frac {B+i A}{4 f \left (a^2+i a^2 \tan (e+f x)\right )}+\frac {x (A-i B)}{4 a^2}+\frac {-B+i A}{4 f (a+i a \tan (e+f x))^2} \]
[In]
[Out]
Rule 8
Rule 3560
Rule 3607
Rubi steps \begin{align*} \text {integral}& = \frac {i A-B}{4 f (a+i a \tan (e+f x))^2}+\frac {(A-i B) \int \frac {1}{a+i a \tan (e+f x)} \, dx}{2 a} \\ & = \frac {i A-B}{4 f (a+i a \tan (e+f x))^2}+\frac {i A+B}{4 f \left (a^2+i a^2 \tan (e+f x)\right )}+\frac {(A-i B) \int 1 \, dx}{4 a^2} \\ & = \frac {(A-i B) x}{4 a^2}+\frac {i A-B}{4 f (a+i a \tan (e+f x))^2}+\frac {i A+B}{4 f \left (a^2+i a^2 \tan (e+f x)\right )} \\ \end{align*}
Time = 0.80 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.11 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2} \, dx=\frac {(A-i B) \arctan (\tan (e+f x))}{4 a^2 f}-\frac {i A-B}{4 a^2 f (i-\tan (e+f x))^2}-\frac {A-i B}{4 a^2 f (i-\tan (e+f x))} \]
[In]
[Out]
Time = 0.10 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.91
method | result | size |
risch | \(-\frac {i x B}{4 a^{2}}+\frac {x A}{4 a^{2}}+\frac {i A \,{\mathrm e}^{-2 i \left (f x +e \right )}}{4 a^{2} f}-\frac {{\mathrm e}^{-4 i \left (f x +e \right )} B}{16 a^{2} f}+\frac {i {\mathrm e}^{-4 i \left (f x +e \right )} A}{16 a^{2} f}\) | \(73\) |
derivativedivides | \(\frac {B}{4 f \,a^{2} \left (-i+\tan \left (f x +e \right )\right )^{2}}-\frac {i A}{4 f \,a^{2} \left (-i+\tan \left (f x +e \right )\right )^{2}}+\frac {A}{4 f \,a^{2} \left (-i+\tan \left (f x +e \right )\right )}-\frac {i B}{4 f \,a^{2} \left (-i+\tan \left (f x +e \right )\right )}+\frac {A \arctan \left (\tan \left (f x +e \right )\right )}{4 f \,a^{2}}-\frac {i B \arctan \left (\tan \left (f x +e \right )\right )}{4 f \,a^{2}}\) | \(117\) |
default | \(\frac {B}{4 f \,a^{2} \left (-i+\tan \left (f x +e \right )\right )^{2}}-\frac {i A}{4 f \,a^{2} \left (-i+\tan \left (f x +e \right )\right )^{2}}+\frac {A}{4 f \,a^{2} \left (-i+\tan \left (f x +e \right )\right )}-\frac {i B}{4 f \,a^{2} \left (-i+\tan \left (f x +e \right )\right )}+\frac {A \arctan \left (\tan \left (f x +e \right )\right )}{4 f \,a^{2}}-\frac {i B \arctan \left (\tan \left (f x +e \right )\right )}{4 f \,a^{2}}\) | \(117\) |
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.68 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2} \, dx=\frac {{\left (4 \, {\left (A - i \, B\right )} f x e^{\left (4 i \, f x + 4 i \, e\right )} + 4 i \, A e^{\left (2 i \, f x + 2 i \, e\right )} + i \, A - B\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{16 \, a^{2} f} \]
[In]
[Out]
Time = 0.18 (sec) , antiderivative size = 162, normalized size of antiderivative = 2.02 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2} \, dx=\begin {cases} \frac {\left (16 i A a^{2} f e^{4 i e} e^{- 2 i f x} + \left (4 i A a^{2} f e^{2 i e} - 4 B a^{2} f e^{2 i e}\right ) e^{- 4 i f x}\right ) e^{- 6 i e}}{64 a^{4} f^{2}} & \text {for}\: a^{4} f^{2} e^{6 i e} \neq 0 \\x \left (- \frac {A - i B}{4 a^{2}} + \frac {\left (A e^{4 i e} + 2 A e^{2 i e} + A - i B e^{4 i e} + i B\right ) e^{- 4 i e}}{4 a^{2}}\right ) & \text {otherwise} \end {cases} + \frac {x \left (A - i B\right )}{4 a^{2}} \]
[In]
[Out]
Exception generated. \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2} \, dx=\text {Exception raised: RuntimeError} \]
[In]
[Out]
none
Time = 0.43 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.38 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2} \, dx=-\frac {\frac {2 \, {\left (-i \, A - B\right )} \log \left (\tan \left (f x + e\right ) + i\right )}{a^{2}} - \frac {2 \, {\left (-i \, A - B\right )} \log \left (\tan \left (f x + e\right ) - i\right )}{a^{2}} - \frac {3 i \, A \tan \left (f x + e\right )^{2} + 3 \, B \tan \left (f x + e\right )^{2} + 10 \, A \tan \left (f x + e\right ) - 10 i \, B \tan \left (f x + e\right ) - 11 i \, A - 3 \, B}{a^{2} {\left (\tan \left (f x + e\right ) - i\right )}^{2}}}{16 \, f} \]
[In]
[Out]
Time = 8.29 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.88 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2} \, dx=\frac {\frac {A}{2\,a^2}+\mathrm {tan}\left (e+f\,x\right )\,\left (\frac {B}{4\,a^2}+\frac {A\,1{}\mathrm {i}}{4\,a^2}\right )}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^2\,1{}\mathrm {i}+2\,\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )}-\frac {x\,\left (B+A\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{4\,a^2} \]
[In]
[Out]